package com.qys.livesMall.anchor.controller.sys;

import com.qys.livesMall.anchor.model.vo.lives.sys.SysLivesGiftListVO;
import com.qys.livesMall.anchor.scheduledTask.OrderAnchorStatisticsTask;
import com.qys.livesMall.common.result.R;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Tag(name = "后台管理-手动执行主播统计定时任务")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@RequestMapping("/sys/anchor/statistics")
public class OrderAnchorStatisticsController {

    private final OrderAnchorStatisticsTask orderAnchorStatisticsTask;
    @GetMapping("/getOrderAnchorStatistics")
    public R<SysLivesGiftListVO> getOrderAnchorStatistics() {
        orderAnchorStatisticsTask.getOrderAnchorStatistics();
        return R.ok();
    }
}
